package itsm.isperp.framework.web.converter;

import itsm.isperp.framework.utils.DateUtils;

import java.io.IOException;
import java.sql.Time;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

/**
 * 
 * 
 * @author lizx
 * @date 2013-5-27
 */
public class CustomSqlTimeSerializer extends JsonSerializer<Time> {

	@Override
	public void serialize(Time value, JsonGenerator jgen,
			SerializerProvider provider) throws IOException,
			JsonProcessingException {
		jgen.writeString(DateUtils.DF_TIME.format(value));

	}

}
